/*
 * IPastebin.cs
 * 
 * Copyright © 2008 David Paleino <d.paleino@gmail.com>
 * 
 *   This library is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser General Public
 *   License as published by the Free Software Foundation; either
 *   version 2.1 of the License, or (at your option) any later version.
 *   
 *   This library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *   Lesser General Public License for more details.
 *   
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, see
 *   <http://www.gnu.org/licenses/>.
 */

using System;
using System.Collections;
using System.IO;

namespace HanskaLabs.Pastebin
{
	/// <summary>
	/// General pastebin interface, should be implemented by single pastebin
	/// implementations.
	/// </summary>
	public interface IPastebin
	{
		/// <summary>
		/// Adds a paste
		/// </summary>
		/// <param name="pastetext">
		/// A <see cref="System.String"/> to be pasted
		/// </param>
		/// <returns>
		/// A <see cref="Hashtable"/>
		/// </returns>
		Hashtable AddPaste(string pastetext);
		
		/// <summary>
		/// Adds a paste
		/// </summary>
		/// <param name="pastetext">
		/// A <see cref="System.String"/> to be pasted
		/// </param>
		/// <param name="name">
		/// A <see cref="System.String"/>, the name of the author
		/// </param>
		/// <returns>
		/// A <see cref="Hashtable"/>
		/// </returns>
		Hashtable AddPaste(string pastetext, string name);
		
		/// <summary>
		/// Adds a paste
		/// </summary>
		/// <param name="pastetext">
		/// A <see cref="System.String"/> to be pasted
		/// </param>
		/// <param name="name">
		/// A <see cref="System.String"/>, the name of the author
		/// </param>
		/// <param name="expire">
		/// A <see cref="System.Int32"/>, the number of seconds before expiring
		/// </param>
		/// <returns>
		/// A <see cref="Hashtable"/>
		/// </returns>
		Hashtable AddPaste(string pastetext, string name, int expire);
		
		/// <summary>
		/// Adds a paste
		/// </summary>
		/// <param name="pastetext">
		/// A <see cref="System.String"/> to be pasted
		/// </param>
		/// <param name="name">
		/// A <see cref="System.String"/>, the name of the author
		/// </param>
		/// <param name="expire">
		/// A <see cref="System.Int32"/>, the number of seconds before expiring
		/// </param>
		/// <param name="lang">
		/// A <see cref="System.String"/>, the language to be used for highlighting
		/// </param>
		/// <returns>
		/// A <see cref="Hashtable"/>
		/// </returns>
		Hashtable AddPaste(string pastetext, string name, int expire, string lang);
		
		/// <summary>
		/// Removes a paste
		/// </summary>
		/// <param name="id">
		/// A <see cref="System.Int32"/>, the id of the paste
		/// </param>
		/// <returns>
		/// A <see cref="Hashtable"/>
		/// </returns>
		Hashtable RemovePaste(int id);
		
		/// <summary>
		/// Removes a paste
		/// </summary>
		/// <param name="digest">
		/// A <see cref="System.String"/>, the digest of the paste
		/// </param>
		/// <returns>
		/// A <see cref="Hashtable"/>
		/// </returns>
		Hashtable RemovePaste(string digest);
		
		/// <summary>
		/// Get data about paste #<paramref name="id" />
		/// </summary>
		/// <param name="id">
		/// A <see cref="System.String"/>, the ID of the paste.
		/// </param>
		/// <returns>
		/// A <see cref="Hashtable"/>
		/// </returns>
		/*
		 * TODO: use generics? Is it possible?
		 */
		Hashtable GetPaste(string id);
		
		/// <summary>
		/// Gets the supported languages for hightlighting purposes.
		/// </summary>
		/// <returns>
		/// An array of <see cref="System.String"/>.
		/// </returns>
		string[] GetLanguages();
		
		/// <summary>
		/// Gets the supported expire times.
		/// </summary>
		/// <returns>
		/// An array of <see cref="System.Int32"/>, each representing the
		/// number of seconds after the paste has been submitted.
		/// </returns>
		int[] GetExpires();
		
		/// <summary>
		/// The default language (usually "plain", or similar).
		/// </summary>
		string DefaultLanguage { get; }
		
		/// <summary>
		/// The default expiration (number of seconds after paste submit).
		/// </summary>
		int DefaultExpiration { get; }
	}
}
